if (!ostree_repo_mark_commit_partial (pull_data->repo, commit, FALSE, error))
goto out;
}
+
+ /* and finally any parent commits we might also have pulled because of depth>0 */
+ GLNX_HASH_TABLE_FOREACH (pull_data->commit_to_depth, const char*, commit)
+ {
+ if (!ostree_repo_mark_commit_partial (pull_data->repo, commit, FALSE, error))
+ goto out;
+ }
}
ret = TRUE;
${CMD_PREFIX} ostree --repo=repo2 pull-local repo
find repo2/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^1$"
+find repo2/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
${CMD_PREFIX} ostree --repo=repo2 pull-local --depth=0 repo
find repo2/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^1$"
+find repo2/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
-${CMD_PREFIX} ostree --repo=repo2 pull-local --depth=1 repo
+${CMD_PREFIX} ostree --repo=repo2 pull-local --depth=1 --commit-metadata-only repo
find repo2/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^2$"
+find repo2/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^1$"
${CMD_PREFIX} ostree --repo=repo2 pull-local --depth=1 repo
find repo2/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^2$"
+find repo2/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
${CMD_PREFIX} ostree --repo=repo2 pull-local --depth=-1 repo
find repo2/objects -name '*.commit' | wc -l > commitcount
assert_file_has_content commitcount "^2$"
+find repo2/state -name '*.commitpartial' | wc -l > commitpartialcount
+assert_file_has_content commitpartialcount "^0$"
echo "ok local pull depth"